SETGROUPS
Section: System Calls (2)
Index
Return to Main Contents
BSD mandoc
BSD 4.2
NAME
setgroups
- set group access list
SYNOPSIS
Fd #include <sys/param.h>
Fd #include <unistd.h>
Ft int
Fn setgroups int ngroups const gid_t *gidset
DESCRIPTION
Fn Setgroups
sets the group access list of the current user process
according to the array
Fa gidset .
The parameter
Fa ngroups
indicates the number of entries in the array and must be no
more than
{NGROUPS_MAX}
Only the super-user may set new groups.
RETURN VALUES
A 0 value is returned on success, -1 on error, with
an error code stored in
errno
ERRORS
The
Fn setgroups
call will fail if:
- Bq Er EINVAL
-
The value of
Fa ngroups
is greater than
{NGROUPS_MAX}
- Bq Er EPERM
-
The caller is not the super-user.
- Bq Er EFAULT
-
The address specified for
Fa gidset
is outside the process
address space.
SEE ALSO
getgroups(2),
initgroups(3)
HISTORY
The
Fn setgroups
function call appeared in
BSD 4.2
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUES
-
- ERRORS
-
- SEE ALSO
-
- HISTORY
-
This document was created by
man2html,
using the manual pages.
Time: 19:41:54 GMT, December 25, 2022